package com.lvmama.pangolin.service.impl;


import java.util.List;

import com.lvmama.pangolin.entity.CommodityRel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.lvmama.pangolin.entity.link.TicketCommodityLink;
import com.lvmama.pangolin.mybatis.mapper.RelevanceCommodityMapper;
import com.lvmama.pangolin.service.RelevanceCommodityService;

@Transactional
@Service
public class RelevanceCommodityServiceImpl implements RelevanceCommodityService{
	@Autowired
	private RelevanceCommodityMapper revelenceCommodityMapper;

	@Override
	public void insertCommodityLink(TicketCommodityLink comLink) {
		revelenceCommodityMapper.insertCommodityLink(comLink);
	}

	@Override
	public void deleteCommodityLink(TicketCommodityLink comLink) {
		revelenceCommodityMapper.deleteCommodityLink(comLink);
	}

	@Override
	public List<TicketCommodityLink> viewCommodityLink(TicketCommodityLink comLink) {
		return revelenceCommodityMapper.viewCommodityLink(comLink);
	}

	@Override
	public List<String> groupByCommodityId(String productId,String businessCode) {
		return revelenceCommodityMapper.groupByCommodityId(productId,businessCode);
	}

	@Override
	public List<TicketCommodityLink> selectByCommProdComp(String productId, String CommodityId, String companyCode) {
		return revelenceCommodityMapper.selectByCommProdComp(productId, CommodityId, companyCode);
	}

	@Override
	public int selectCountByCompanyCode(String companyCode) {
		return revelenceCommodityMapper.selectCountByCompanyCode(companyCode);
	}

	@Override
	public void insertCommodityRel(CommodityRel commodityRel) {
		revelenceCommodityMapper.insertCommodityRel(commodityRel);
	}

	@Override
	public List<CommodityRel> queryByCommodityRel(CommodityRel commodityRel) {
		return revelenceCommodityMapper.queryByCommodityRel(commodityRel);
	}

	@Override
	public List<String> selectBusinessCodes() {
		return revelenceCommodityMapper.selectBusinessCodes();
	}

	@Override
	public List<String> selectCompanyCodes() {
		return revelenceCommodityMapper.selectCompanyCodes();
	}

	@Override
	public int selectCounts(CommodityRel commodityRel) {
		return revelenceCommodityMapper.selectCounts(commodityRel);
	}
}
